// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_SHIP
// * CreateDate    : 2014-06-05 18:30:39
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:39
// * LastChanger   : 2014-06-05 18:30:39
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class SalesShipEntity : EntityBase
    {
        public SalesShipTable TableSchema
        {
            get
            {
                return SalesShipTable.Current;
            }
		}
		
		public SalesShipEntity()
        {

        }
		
		public SalesShipEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.CompanyId = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_ID"]));
			this.SobId = Convert.ToString(CommonFunctions.ToObject(dr["SOB_ID"]));
			this.ShipNo = Convert.ToString(CommonFunctions.ToObject(dr["SHIP_NO"]));
			this.SalesAppId = Convert.ToString(CommonFunctions.ToObject(dr["SALES_APP_ID"]));
			this.SalesAppNo = Convert.ToString(CommonFunctions.ToObject(dr["SALES_APP_NO"]));
			this.Type = Convert.ToString(CommonFunctions.ToObject(dr["TYPE"]));
			this.ShipDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["SHIP_DATE"]));
			this.ShipPerson = Convert.ToString(CommonFunctions.ToObject(dr["SHIP_PERSON"]));
			this.ShipPersonName = Convert.ToString(CommonFunctions.ToObject(dr["SHIP_PERSON_NAME"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.CustomerName = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_NAME"]));
			this.CustomerCode = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_CODE"]));
			this.ContactId = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_ID"]));
			this.ContactUser = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_USER"]));
			this.TransportType = Convert.ToString(CommonFunctions.ToObject(dr["TRANSPORT_TYPE"]));
			this.RevPersonName = Convert.ToString(CommonFunctions.ToObject(dr["REV_PERSON_NAME"]));
			this.RevTel = Convert.ToString(CommonFunctions.ToObject(dr["REV_TEL"]));
			this.RevAdd = Convert.ToString(CommonFunctions.ToObject(dr["REV_ADD"]));
			this.RevPc = Convert.ToString(CommonFunctions.ToObject(dr["REV_PC"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.TotalAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_AMOUNT"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public SalesShipEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.CompanyId = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_ID"]));
			this.SobId = Convert.ToString(CommonFunctions.ToObject(dr["SOB_ID"]));
			this.ShipNo = Convert.ToString(CommonFunctions.ToObject(dr["SHIP_NO"]));
			this.SalesAppId = Convert.ToString(CommonFunctions.ToObject(dr["SALES_APP_ID"]));
			this.SalesAppNo = Convert.ToString(CommonFunctions.ToObject(dr["SALES_APP_NO"]));
			this.Type = Convert.ToString(CommonFunctions.ToObject(dr["TYPE"]));
			this.ShipDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["SHIP_DATE"]));
			this.ShipPerson = Convert.ToString(CommonFunctions.ToObject(dr["SHIP_PERSON"]));
			this.ShipPersonName = Convert.ToString(CommonFunctions.ToObject(dr["SHIP_PERSON_NAME"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.CustomerName = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_NAME"]));
			this.CustomerCode = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_CODE"]));
			this.ContactId = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_ID"]));
			this.ContactUser = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_USER"]));
			this.TransportType = Convert.ToString(CommonFunctions.ToObject(dr["TRANSPORT_TYPE"]));
			this.RevPersonName = Convert.ToString(CommonFunctions.ToObject(dr["REV_PERSON_NAME"]));
			this.RevTel = Convert.ToString(CommonFunctions.ToObject(dr["REV_TEL"]));
			this.RevAdd = Convert.ToString(CommonFunctions.ToObject(dr["REV_ADD"]));
			this.RevPc = Convert.ToString(CommonFunctions.ToObject(dr["REV_PC"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.TotalAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_AMOUNT"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesShipTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_ID)); }
            set { SetData(SalesShipTable.C_ID, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_CREATED_BY)); }
            set { SetData(SalesShipTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(SalesShipTable.C_CREATED_DATE)); }
            set { SetData(SalesShipTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_UPDATED_BY)); }
            set { SetData(SalesShipTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(SalesShipTable.C_UPDATED_DATE)); }
            set { SetData(SalesShipTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(SalesShipTable.C_IS_ACTIVE)); }
            set { SetData(SalesShipTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string CompanyId
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_COMPANY_ID)); }
            set { SetData(SalesShipTable.C_COMPANY_ID, value); }
        }
		
        [DataMember]
        public string SobId
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_SOB_ID)); }
            set { SetData(SalesShipTable.C_SOB_ID, value); }
        }
		
        [DataMember]
        public string ShipNo
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_SHIP_NO)); }
            set { SetData(SalesShipTable.C_SHIP_NO, value); }
        }
		
        [DataMember]
        public string SalesAppId
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_SALES_APP_ID)); }
            set { SetData(SalesShipTable.C_SALES_APP_ID, value); }
        }
		
        [DataMember]
        public string SalesAppNo
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_SALES_APP_NO)); }
            set { SetData(SalesShipTable.C_SALES_APP_NO, value); }
        }
		
        [DataMember]
        public string Type
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_TYPE)); }
            set { SetData(SalesShipTable.C_TYPE, value); }
        }
		
        [DataMember]
        public DateTime ShipDate
        {
            get { return Convert.ToDateTime(GetData(SalesShipTable.C_SHIP_DATE)); }
            set { SetData(SalesShipTable.C_SHIP_DATE, value); }
        }
		
        [DataMember]
        public string ShipPerson
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_SHIP_PERSON)); }
            set { SetData(SalesShipTable.C_SHIP_PERSON, value); }
        }
		
        [DataMember]
        public string ShipPersonName
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_SHIP_PERSON_NAME)); }
            set { SetData(SalesShipTable.C_SHIP_PERSON_NAME, value); }
        }
		
        [DataMember]
        public string CustomerId
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_CUSTOMER_ID)); }
            set { SetData(SalesShipTable.C_CUSTOMER_ID, value); }
        }
		
        [DataMember]
        public string CustomerName
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_CUSTOMER_NAME)); }
            set { SetData(SalesShipTable.C_CUSTOMER_NAME, value); }
        }
		
        [DataMember]
        public string CustomerCode
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_CUSTOMER_CODE)); }
            set { SetData(SalesShipTable.C_CUSTOMER_CODE, value); }
        }
		
        [DataMember]
        public string ContactId
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_CONTACT_ID)); }
            set { SetData(SalesShipTable.C_CONTACT_ID, value); }
        }
		
        [DataMember]
        public string ContactUser
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_CONTACT_USER)); }
            set { SetData(SalesShipTable.C_CONTACT_USER, value); }
        }
		
        [DataMember]
        public string TransportType
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_TRANSPORT_TYPE)); }
            set { SetData(SalesShipTable.C_TRANSPORT_TYPE, value); }
        }
		
        [DataMember]
        public string RevPersonName
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_REV_PERSON_NAME)); }
            set { SetData(SalesShipTable.C_REV_PERSON_NAME, value); }
        }
		
        [DataMember]
        public string RevTel
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_REV_TEL)); }
            set { SetData(SalesShipTable.C_REV_TEL, value); }
        }
		
        [DataMember]
        public string RevAdd
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_REV_ADD)); }
            set { SetData(SalesShipTable.C_REV_ADD, value); }
        }
		
        [DataMember]
        public string RevPc
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_REV_PC)); }
            set { SetData(SalesShipTable.C_REV_PC, value); }
        }
		
        [DataMember]
        public string Currency
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_CURRENCY)); }
            set { SetData(SalesShipTable.C_CURRENCY, value); }
        }
		
        [DataMember]
        public decimal TotalAmount
        {
            get { return Convert.ToDecimal(GetData(SalesShipTable.C_TOTAL_AMOUNT)); }
            set { SetData(SalesShipTable.C_TOTAL_AMOUNT, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_REMARK)); }
            set { SetData(SalesShipTable.C_REMARK, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(SalesShipTable.C_STATUS)); }
            set { SetData(SalesShipTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

